package com.molin.IOtest.charstreamTest;

import java.io.FileReader;
import java.io.IOException;

public class Demo5 {
    public static void main(String[] args) throws IOException {
        String path="D:\\IdeaProjects\\BasicCode\\mIdeaTest\\src\\com\\molin\\IOtest\\charstreamTest\\a.txt";
        FileReader fr=new FileReader(path);
//一次读取多个字符
        int len;
        char[] arr=new char[1024];

        while ((len=fr.read(arr))!=-1){
            System.out.println(new String(arr,0,len));
        }
        fr.close();
    }
}
